﻿<Window x:Class="BookvarWpf.Windows.UpdateWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:r="clr-namespace:Bookvar.UI.Localization;assembly=Bookvar.UI"
        Width="400"     
        Height="200"

        Title="{r:Resources UpdateWindowTitleText}"
        Background="{StaticResource ListBackground}"
        ResizeMode="NoResize" WindowStartupLocation="CenterScreen"   WindowStyle="SingleBorderWindow" 
        x:Name="currentWindow"
    >
    <Window.Resources>
        <BooleanToVisibilityConverter x:Key="booleanToVisibilityConverter" />
    </Window.Resources>
    <Grid  Margin="10,10,10,10">
        <Grid.RowDefinitions>
            <RowDefinition Height="50" />
            <RowDefinition Height="*" />
            <RowDefinition Height="50" />
        </Grid.RowDefinitions>
        <!--        <Grid.ColumnDefinitions>-->
        <!--            <ColumnDefinition Width="*" />-->
        <!--            <ColumnDefinition Width="50"-->
        <!--        </Grid.ColumnDefinitions>-->
        <TextBlock x:Name="UpdatingText" Grid.Row="0" Text="{Binding Path=UpdatingProcessText, ElementName=currentWindow}" />
        <ProgressBar x:Name="Process" Grid.Row="1" Value="{Binding Path=ProgressValue, ElementName=currentWindow}" Height="20"  Minimum="0" Maximum="100" 
                     Visibility="{Binding Path=IsProgressVisible, ElementName=currentWindow, Converter={StaticResource booleanToVisibilityConverter} }"  />
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="10,6,15,6" Grid.Row="2">
        <Button x:Name="btnYes" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="10,6,15,6" 
                Visibility="{Binding Path=IsYesButtonVisible, ElementName=currentWindow, Converter={StaticResource booleanToVisibilityConverter}}"  
                Click="btnYes_Click" Height="22" BorderBrush="#FF536B88" Background="{StaticResource BlueButtonStyleBrush}"
                Content="{r:Resources YesDefaultText}" />
		<Button BorderBrush="#FF536B88" HorizontalAlignment="Right" Click="btnNo_Click" x:Name="btnNo"
                Visibility="{Binding Path=IsNoButtonVisible, ElementName=currentWindow, Converter={StaticResource booleanToVisibilityConverter}}"
                VerticalAlignment="Center" Margin="10,6,15,6" Height="22" Background="{StaticResource BlueButtonStyleBrush}"
                Content="{r:Resources NoDefaultText}" />
		<Button BorderBrush="#FF536B88" HorizontalAlignment="Right" x:Name="btnOk"  Click="btnOK_Click"
                Visibility="{Binding Path=IsOkButtonVisible, ElementName=currentWindow, Converter={StaticResource booleanToVisibilityConverter}}"
                VerticalAlignment="Center" Margin="10,6,15,6" Height="22" Background="{StaticResource BlueButtonStyleBrush}"
                Content="{r:Resources OkDefaultText}" />
		<Button BorderBrush="#FF536B88" HorizontalAlignment="Right" x:Name="btnCancel" IsCancel="True" Click="btnCancel_Click"
                Visibility="{Binding Path=IsCancelButtonVisible, ElementName=currentWindow, Converter={StaticResource booleanToVisibilityConverter}}"
                VerticalAlignment="Center" Margin="10,6,15,6" Height="22" Background="{StaticResource BlueButtonStyleBrush}"
                Content="{r:Resources CancelDefaultText}" />
        </StackPanel>
    </Grid>

</Window>
